<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<title>信用卡推广</title>
	<style>
		html,body {
			height: 100%;
		}
		* {
		    margin: 0;
		    padding: 0;
		}
		img {
		    width: 100%;
		    display: block;
		}
		/* 媒体查询 */
		@media only screen and (min-width: 320px) {
		    html {
		        font-size: 16px;
		    }
		}
		@media only screen and (min-width: 360px) {
		    html {
		        font-size: 18px;
		    }
		}
		@media only screen and (min-width: 375px) {
		    html {
		        font-size: 18.75px;
		    }
		}
		@media only screen and (min-width: 412px) {
		    html {
		        font-size: 20.6px;
		    }
		}
		@media only screen and (min-width: 414px) {
		    html {
		        font-size: 20.7px;
		    }
		}
		@media only screen and (min-width: 640px) {
		    html {
		        font-size: 32px;
		    }
		}
		.wrapper {
			height: 100%;
			/*background: url('img/youniao.png') no-repeat bottom center;*/
			background-size: cover;
			position: relative; 
		}
		.wrapper img{
			height: 100%;
		}
		.QR-code {
			position: absolute;
			bottom: 1rem;
			left: 50%;
			transform: translateX(-50%);
		}
		.QR-code .code-img {
			width: 7.87rem;
			height: 7.87rem;
			margin: 0 auto;
			background-color: #fff;
			/* background: url('images/2350.png') no-repeat center; */
			/* background-size: cover; */
		}
		.QR-code p {
			margin-top: 0.37rem;
			text-align: center;
			font-size: 0.64rem;
			color: #fff;
		}
	</style>
</head>
<body>
	<div class="wrapper">
		<img src="${webPath}/skin/share/loancard/images/youniao.png" alt="">
		<div class="QR-code">
			<div class="code-img"><img src="" alt=""></div>
			<p>无需任何费用，扫码即可申请</p>
		</div>
	</div>
	<script src="${webPath}/js-lib/share/zepto.js"></script>
	<script>
		$(function() {
			var urlParams = getUrlData();
			// 获取url中的参数方法
			function getUrlData() {
				var urlData = window.location.search.slice(1);
				urlDataArr = urlData.split('&');
	
				var result = {};
				urlDataArr.forEach(function(val,index){
					val = val.split('=');
					result[val[0]] = val[1];
				})
				return result;
			}
			var userId = urlParams['userId'], targetId = urlParams['targetId'], imagePath = '/uploads/qr_code/share/loancard/card/LOAN_CARD_U' + userId + '.png';
			if(targetId != '' && targetId != null && targetId != undefined){
				imagePath = '/uploads/qr_code/share/loancard/target/LOAN_CARD_U' + userId + "T" + targetId + ".png";
			}
			$('.code-img img').attr('src', 'http://www.uniao.me' + imagePath);
		});
	</script>
</body>
</html>